import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "greater healing", "!",
                ('life', 'more', 'more'),
                idDescription = "You grimace just thinking about this "\
                    "potion's putrid taste. What's that Sillan proverb? "\
                    "\"Even honey can taste bitter if it's used as medicine.\"")

    def quaff(self, quaffer):
        if quaffer['hp'] < quaffer['maxHP']:
            main.schedule(sim.Event('increase stat', main.schedule.time, (quaffer,
                'hp', random.randint(40,60)), dests=[quaffer]))
            main.transient('You feel much healthier!')
            main.player.identify(self)
        else:
            main.transient('Nothing seems to happen.')

#========================================
thingClass = Potion
